var electron = require("electron");
var app = electron.app;
var BrowserWindow = electron.BrowserWindow;
var win = null;
app.on("ready", function () {
  win = new BrowserWindow({
    autoHideMenuBar: true,
    title: "测试Sqlite演示 | By vi",
    icon: __dirname + "/logo.ico",
    width: 1280,
    height: 600,
    webPreferences: {
      nodeIntegration: true,
      contextIsolation: false,
    },
  });
  win.maximize();
  win.loadFile("page/index.html");
  // win.loadURL("http://a-vi.com");
  win.on("closed", function () {
    win = null;
  });
  win.on("page-title-updated", function (e, cmd) {
    e.preventDefault();
  });
  // 打开调试控制台
  win.webContents.openDevTools();
});
app.on("window-all-closed", function () {
  app.quit();
});
